<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category   design_blank
 * @package    Mage_Ideal
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
?>
<?php $_oscOrders = $this->getOsCommerceOrders(); ?>
<?php if(sizeof($_oscOrders)) :?>
<div class="page-title">
   <h2><?php echo $this->__('My Previous Orders') ?></h2>
</div>
<table class="data-table" id="my-orders-table">
    <thead>
        <tr>
            <th><?php echo $this->__('Order #') ?></th>
            <th><?php echo $this->__('Date') ?></th>
            <th><?php echo $this->__('Ship to') ?></th>
            <th><?php echo $this->__('Order Total') ?></th>
            <th>&nbsp;</th>
        </tr>
    </thead>
    <tbody>
        <?php $_odd = ''; ?>
        <?php foreach ($_oscOrders as $_oscOrder): ?>
            <tr>
                <td><?php echo $_oscOrder['orders_id'] ?></td>
                <td><?php echo $this->formatDate($_oscOrder['date_purchased'], 'medium', true) ?></td>
                <td><?php echo $this->htmlEscape($_oscOrder['delivery_street_address']) ?></td>
                <td><?php echo ($_oscOrder['currency_symbol']?$_oscOrder['currency_symbol']:$_oscOrder['currency']).' '.number_format($_oscOrder['value'],2) ?></td>
                <td class="a-center"><a href="<?php echo $this->getViewOscommerceUrl($_oscOrder) ?>"><?php echo $this->__('View Order') ?></a>
                </td>
            </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<?php endif; ?>
